home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
G-Games
/
(c)gf.d64
/
westward ho!.c
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2007-02-04
|
7KB
|
236 lines
4 POKE53280,9:POKE53281,9
5 GOSUB3000
6 PRINT,"[129]WRITTEN FOR THE PET
7 [153]," BY
8 PRINT,"[155]WILLIAM L. BROWN
10 [153],"FORADAPTED FOR THE 64
11 PRINT," BY
12 [153],"LISTSTEVEN C. DARNOLD
13 PRINT,"P.O. BOX 201
14 [153],"ALEXANDRA, NEW ZEALAND";
15 [129]I[178]1[164]5000:[130]
20 [134]B$(4),B(4),C(4),D(4),W(14):B[178][187]([171]TI)
30 B$(1)[178]"FOOD......":B$(2)[178]"AMMUNITION":B$(3)[178]"CLOTHING..":B$(4)[178]"SUPPLIES.."
40 [141]3000
50 [153]"FOR GOLD RUSH ! LET'S GO WEST !":[129]I[178]1[164]2500:[130]
60 [141]3000:[153]"FORYOU HAVE $700 TO BUY WHAT YOU NEED. YOU
70 PRINT"MUST SPEND BETWEEN $200 AND $300 FOR A
80 [153]"TEAM OF OXEN. THE MORE MONEY YOU SPEND
90 PRINT"ON THEM, THE BETTER THE TEAM YOU GET.
130 [153]"LISTHOW MUCH WILL YOU SPEND FOR OXEN CMDCMDCMDCMDCMD? ";
140 [141]1980:B[178]A
150 [139]B[178]999[167]B[178]280:B(1)[178]30:B(2)[178]110:B(3)[178]100:B(4)[178]130:G[178]50:[137]220
160 [139]B[179]200[176]B[177]300[167][153]"ONON";:[137]130
170 [129]I[178]1[164]4:[153]"HOW MUCH FOR "B$(I)" ";
180 [141]1980:B(I)[178]A:[130]
190 T3[178]B[170]B(1)[170]B(2)[170]B(3)[170]B(4)
200 [139]700[179]T3[167][153]"PARDNER, YOU SPENT MORE THAN YOU HAD.":[137]240
210 G[178]700[171]T3
220 [153]"LOADFORYOUR WAGON IS LOADED AND READY TO GO.
222 PRINT"YOU HAVE $"MID$(STR$(G),2)" LEFT TO BUY THINGS ALONG
230 [153]"THE WAY.LIST":[137]280
240 [153]"IF YOU ARE READY TO COUNT STRAIGHT,
250 PRINT"TYPE GO":GOSUB1860:C$=C1$:GOSUB1860:C$=C$+C1$:PRINT
260 IFC$="GO"THEN130
270 GOTO60
280 PRINT:PRINT
290 IFF<150THENF=2000
300 PRINT"YOU HAVE"F"MILES TO GO.
310 [143] *** HUNT?
319 [151]54296,0
320 [153]"FORDO YOU WANT TO HUNT? ";:[141]1860:C(1)[178]5:[139]C1$[179][177]"N"[167]560
330 [151]54296,0:[153]"LOADFORYOUR CURRENT SITUATION.LIST
340 REM *** UPDATE
350 GOSUB2050
360 C(3)=5:C(4)=5:M=INT(RND(1)*B)+1
370 FORI=1TO4:B(I)=B(I)-C(I)+D(I):NEXT
380 F=F-M:G=G-L
390 PRINT"MILES TO GO:";F:IFF<1THENPRINT"[147][155]HURRAH! YOU MADE IT![129]":END
400 FORI=1TO4:PRINT""B$(I);B(I):IFB(I)<1THEN420
410 NEXT:GOTO470
420 PRINT"[129]":ONIGOTO430,440,450,460
430 PRINT"[147]NO FOOD. YOU STARVED.":GOTO1840
440 PRINT"[147]NO BULLETS. BANDITS ATTACK.":GOTO1840
450 PRINT"[147]NO CLOTHES. YOU FROZE. SORRY.":GOTO1840
460 PRINT"[147]NO SUPPLIES. TERMINALLY ILL.":GOTO1840
470 PRINT"CASH:";G
480 REM *** CONTROL SECTION
490 L=0:M=0:FORI=1TO4:C(I)=0:D(I)=0:NEXT:GOSUB1940:O=O+1
500 U=INT(RND(1)*12)+1
510 IFO>12THEN540
520 IFW(U)=-1THEN500
530 W(U)=-1
540 ONUGOSUB710,820,860,910,1060,1170,1200,1240,1280,1460,1810,1830
550 REM *** HUNT
560 PRINT"[147][155]YOU GET 3 SHOTS":GOSUB2040
562 PRINT"[129]AIM BY ENTERING NUMBER BETWEEN [155]3[129] AND [155]20
570 C(1)[178]10:Z[178]0:[141]2020:[151]198,0
580 [141]2060
590 [153]"LOAD":U[178][181]([187](1)[172]20)[170]1
600 [139]U[179]3[167]590
610 [129]W[178]1[164]U:[153]:[130]:[153][163]33)"FORYSPC(SPC(SPC((null)
620 X=0:PRINT"":PRINT"[155]NUMBER, PLEASE [157][157][157][157]";:D(2)=D(2)-5
630 GOSUB1860:X=10*X+VAL(C1$):IFX<3THEN630
640 IFX>20THENPRINT"ONLY 3 THRU 20, PLEASE":GOSUB2040:GOTO620
649 PRINT"":FORW=1TOX:PRINT:NEXT:GOSUB4000
650 FORW=1TO39:PRINT" [209][157]";:GOSUB2080:NEXT
660 Z=Z+1:IFX<>UTHEN670
662 GOSUB7000:PRINT"[147]GREAT SHOT, PARDNER!":D(1)=30:GOTO690
670 IFZ<3THEN580
680 GOSUB2050:PRINT"[147]NO LUCK TODAY, PARDNER.
690 [141]2030:[137]330
700 [143] *** ANIMAL ATTACK
710 [153]"LOADLISTWILD ANIMAL ATTACK!! FOR(TYPE BANG)LIST
720 D(2)=-10:T2=TI+240:C$="":POKE198,0
730 FORI=1TO4:GOSUB1860:C$=C$+C1$:IFTI<T2THENNEXT
740 IFC$<>"BANG"THENPRINT"[129]LOUSY SHOT, PARDNER.":GOTO780
750 IFTI>T2THENPRINT"[129]TOO SLOW, PARDNER.":GOTO780
760 GOSUB4000:PRINT"[129]YOU'RE A COOL DUDE, PARDNER!":PRINT"[155]YOU GOT THE BEAST!
770 [137]800
780 D(4)[178][171]20:[153]"LISTTHE BEAST INJURED YOU.
790 PRINT"MEDICAL SUPPLIES USED.
800 [141]2030:[137]320
810 [143] *** FORD RIVER
820 [153]"LOADLISTYOU LOSE SUPPLIES AND CLOTHES":D(3)[178][171]10:D(4)[178][171]10
830 [153]"FORDING A RIVER.
840 GOSUB2030:GOTO800
850 REM *** BLIZZARD
860 PRINT"[147]YOU GET CAUGHT IN A BLIZZARD WHILE
870 [153]"GOING THROUGH A MOUNTAIN PASS.
880 PRINT"SUPPLIES USED TO TREAT SICKNESS.":D(4)=-10
890 GOTO840
900 REM *** ARROWS FLY!
910 PRINT"[147]ARROWS FLY! RUN FOR THE WAGONS!
920 [141]2030
930 [153]"LOAD"[163]23)"LISTSPC(SPC(SPC(SPC( SPC(SPC(SPC(SPC(
940 PRINTTAB(23)"[166][166][166][166] [166][166][166][166]
950 [153][163]23)"FOR(null)FREFRE(null) (null)FREFRE(null)
960 Z1=-1:X=20
970 PRINT"":X=X-2:FORW=1TOX:PRINT:NEXT:PRINTTAB(26)"+":FORS=1TO300:NEXT
980 Y=Z1*INT((RND(1)+.22)*4)+X:Z1=-Z1
990 IFY<4THEN980
1000 PRINT"[129]":FORW=1TOY:PRINT:NEXT:FORW=1TO36:PRINT" ->[157][157]";:GOSUB2070:NEXT
1010 IFY=XTHENPRINT"[147]SORRY, PARDNER. BETTER LUCK NEXT TRIP.":GOTO1840
1020 IFX<3THENPRINT"[147]":PRINT"[155]CLOSE CALL, PARDNER!":GOSUB2040:GOTO320
1030 PRINT"":FORW=1TOX:PRINT:NEXT:PRINTTAB(26)" ":GOSUB2050
1040 GOTO970
1050 REM *** FORT
1060 PRINT"[147][155]YOU REACH A FORT...[129]
1070 [139]G[177]0[137]1100
1080 [153]"BUT YOU ARE OUT OF MONEY!
1090 GOTO1150
1100 PRINT" BUY WHAT YOU NEED. TYPE DOLLAR AMOUNT.[155]
1110 [129]I[178]1[164]4:[153]""B$(I)" CMDCMDCMDCMD ";
1120 [141]1980:D(I)[178]A:[130]
1130 L[178]0:[129]I[178]1[164]4:L[178]L[170]D(I):[130]
1140 [139]G[179]L[167][153]"YOU ONLY HAVE $"G"LEFT. TRY AGAIN.":[137]1060
1150 [137]690
1160 [143] *** STORM
1170 [153]"LOADYOU ARE CAUGHT IN A BAD STORM.
1180 PRINT"[155]YOU LOSE CLOTHES AND SUPPLIES.":D(3)=-10:D(4)=-10
1190 GOTO690
1200 REM *** LOSE WAY
1210 PRINT"[147][155]YOU LOSE YOUR WAY.
1220 [153]"YOU USE ADDITIONAL SUPPLIES.":D(4)[178][171]10:[137]690
1230 [143] *** OUTLAWS
1240 [153]"LOADOUTLAWS STEAL CLOTHES AND
1250 PRINT"AMMUNITION.":D(3)=-10:D(4)=-10
1260 GOTO1190
1270 REM *** RACE W/CHIEF
1280 PRINT"[147][155]INDIAN CHIEF WANTS HORSE RACE.
1290 [153]"FORIF YOU WIN, HE'LL GIVE YOU SOME CLOTHES
1292 PRINT"AND FOOD. IF YOU LOSE, HE'LL TAKE SOME
1294 [153]"OF YOUR BULLETS.
1300 PRINT"[155]WILL YOU RACE? ";:GOSUB1860:IFC1$="N"THEN1460
1310 X2=0:Y2=0:PRINT"[147]":PRINTTAB(32)"[129][194][158]YOU
1320 [153]"":[153][163]32)"FORPEEKCHIEF
1330 GOSUB2040
1340 PRINT"":X1=X2:X2=X1+INT(RND(1)*2)+1:Y1=Y2:Y2=Y1+INT(RND(1)*2)+1
1350 IFX2>32THENX2=32
1360 IFY2>32THENY2=32
1370 PRINTTAB(X1):FORW=X1+1TOX2:PRINT"[158]>";:GOSUB5000:NEXT
1380 FORS=1TO60:NEXT:PRINT
1390 PRINTTAB(Y1):FORW=Y1+1TOY2:PRINT">";:GOSUB6000:NEXT
1400 PRINT
1410 IFX2>31ANDX2=Y2THENPRINT:PRINT"[129]TIE!! RACE AGAIN!":GOSUB2030:GOTO1310
1420 IFX2>31ANDX2>Y2THENPRINT:PRINT"[158]YOU WIN!":D(1)=30:D(3)=30:GOTO319
1430 IFY2>31ANDY2>X2THENPRINT:PRINT"[155]YOU LOSE.":D(2)=-30:GOTO319
1440 GOTO1340
1450 REM *** AMBUSH
1460 PRINT"[147]YOU ARE AMBUSHED BY A BANDIT.
1470 [153]"IT'S YOU OR HIM, PARDNER!
1480 PRINT"WATCH THE SCREEN.
1490 [153]"FORPRESS RFOR WHEN YOU ARE READY...
1500 GETR$:IFR$<>"R"THEN1500
1510 POKE198,0:PRINT"[147]":D(2)=-10
1520 PRINT"[129] [164][164][164] [164][164][164]
1530 [153]" THEN FN THEN FN
1540 PRINT" [167] [165] [167] [165]"
1550 PRINT" [163][163][163] [163][163][163]
1560 [153]" (null)(null) (null)(null)
1570 PRINT"[155] YOU[129][167] [165] [167] [165] [155]HIM
1580 [153]"FOR THEN FNTOTO TOTOTHEN FN
1590 PRINT" [205] [206]
1600 [153]" TAB(TAB(TAB(TAB( TAB(TAB(TAB(TAB(
1610 PRINT" [167] [165] [167] [165]
1620 [153]" THEN FN THEN FN
1630 PRINT" [129] [146]
1650 [153]"LIST TYPE DRAWLIST":[153]
1660 T2[178]TI[170]200:R$[178]"":[129]I[178]1[164]4:[141]1860:R$[178]R$[170]C1$:[130]
1670 [139]R$[178]"DRAW"[167]1690
1680 O1[178]1:[137]1740
1690 [139]TI[179]T2[167]1710
1700 [137]1740
1710 [153]"":[129]W[178]1[164]7:[153]" ":[130]
1720 [153][163]8)"LIST>>>>>>>>>>>>>>>>>>>>>>>>>KABOOM!":[141]4000:[141]2050
1730 [153]"":[129]W[178]1[164]15:[153]" ":[130]:[153]"SYSYOU DID IT, PARDNER!":[137]800
1740 [153]"":X[178][181]([187](1)[172]5)[170]3:Y[178][181]([187](1)[172]3)[170]5:[141]4000
1750 [129]W[178]1[164]X:[153]" ":[130]:[153][163]Y)"*":O1[178]O1[170]1:[141]2060:[139]O1[177]4[167]1770
1760 [137]1740
1770 [141]2030:[153]"LOADFORSORRY, PARDNER, HE GOT YOU.
1780 PRINT"BETTER LUCK NEXT TRIP.
1790 [137]1840
1800 [143] *** BLUE SKIES
1810 [153]"LOADBLUE SKIES. SMOOTH GOING.":[137]320
1820 [143] *** GOING WELL
1830 [153]"LOADGOOD WEATHER. EVERYTHING GOING WELL.":[137]320
1840 [153],"LISTYOU'RE DEAD.FOR":[128]
1850 [143] *** GET INPUT
1860 L1[178]2:C1$[178]""
1870 T1[178]TI[170]20:L1[178]3[171]L1:[139]C1$[179][177]""[167]1912
1880 [161]C1$
1890 [139]TI[179]T1[167][153][202]("SPC( ",L1,1)"CMD";:[137]1910
1900 [137]1870
1910 [139]C1$[178]""[167]1880
1912 [139]C1$[178]"$"[167]1880
1920 [153]" CMD"C1$;:[142]
1930 :
1940 [153]"FORPRESS CFOR TO CONTINUE.LIST
1950 GETC$:IFC$<>"C"THEN1950
1960 RETURN
1970 REM *** GET NUMBER > 10
1980 A=0:POKE198,0
1990 GOSUB1860:IFC1$=CHR$(20)THENA=INT(A/10):GOTO1990
2000 IFC1$<>CHR$(13)THENA=10*A+VAL(C1$):GOTO1990
2010 RETURN
2020 FORS=1TO240:NEXT
2030 FORS=1TO240:NEXT
2040 FORS=1TO250:NEXT
2050 FORS=1TO250:NEXT
2060 FORS=1TO250:NEXT
2070 FORS=1TO2:NEXT
2080 FORS=1TO2:NEXT:RETURN
3000 PRINT"[147][142] [164][164] [164][164] [164][164][164] [164][164]
3001 [153]" THEN FN(null) (null)AND (null) THEN FN(null)(null)THENAND(null) (null)(null) FNTHEN (null)USR(null)
3002 PRINT" [167][206][205][165][204][175] [175][186] [221] [167][206][205][165][207][208][167] [205] [204][206] [207][208] [205][175][206]
3009 [142]
4000 [129]I[178]15[164]0[169][171]1.5:[151]54296,I:[151]54277,15:[151]54276,129:[151]54273,40:[130]
4005 [151]54276,0:[151]54277,0:[142]
5000 [151]54296,15:[151]54277,8:[151]54273,120:[151]54276,33
5010 [129]I[178]1[164]55:[130]:[151]54276,32:[142]
6000 [151]54296,15:[151]54277,8:[151]54273,30:[151]54276,33
6010 [129]I[178]1[164]55:[130]:[151]54276,32:[142]
7000 [151]54296,15:[151]54277,8
7001 [129]S[178]100[164]200[169]20:[151]54273,S:[151]54276,33
7010 [129]I[178]1[164]5:[130]:[151]54276,32:[130]:[151]54296,0:[142]